package com.sevenGroup.pawnshop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sevenGroup.pawnshop.controller.form.FirstTypePropertiesForm;
import com.sevenGroup.pawnshop.controller.form.PropertiesForm;
import com.sevenGroup.pawnshop.controller.form.SelectPropertiesForm;
import com.sevenGroup.pawnshop.controller.form.pageForm;
import com.sevenGroup.pawnshop.controller.info.PropertiesInfo;
import com.sevenGroup.pawnshop.exception.sevenGroupException;
import com.sevenGroup.pawnshop.model.FirstType;
import com.sevenGroup.pawnshop.model.Properties;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sevenGroup
 * @since 2022-02-18
 */
public interface PropertiesService extends IService<Properties> {

    //新增属性
    void saveProperties(PropertiesForm propertiesForm) throws sevenGroupException;
    //更新属性
    void updateProperties(PropertiesForm propertiesForm) throws sevenGroupException;
    //分页查询所有属性
    IPage selectAllProperties(pageForm pageForm) throws sevenGroupException;
    //根据商品id查询所有属性
    List<PropertiesInfo> selectPropertiesByGoodId(Integer goodId) throws sevenGroupException;
    //根据属性名模糊查询所有属性
    IPage<PropertiesInfo> selectPropertiesByPropertiesName(SelectPropertiesForm selectPropertiesForm) throws sevenGroupException;
    //根据商品大类查询所有属性
    List<PropertiesInfo> selectPropertiesByFirstTypeId(Integer firstTypeId) throws sevenGroupException;
    //根据商品大类查询所有属性
    void updateFirstTypeProperties(FirstTypePropertiesForm firstTypePropertiesForm) throws sevenGroupException;
    //根据属性id删除属性
    void delPropertiesByPropertiesId(Integer propertiesId) throws sevenGroupException;
    //根据属性id集合删除属性
    void delPropertiesByList(List<Integer> list) throws sevenGroupException;
    //根据属性id查询所有商品大类
    List<FirstType> selectFirstTypesByProperties(Integer propertiesId) throws sevenGroupException;
}
